<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/Static/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="/Static/Css/zh-cn-system.css" />
<link rel="stylesheet" type="text/css" href="/Static/Css/table_form.css" />
<script src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/jquery.form.js"></script>
<script src="/Public/js/main.js"></script>
<script type="text/javascript" src="/Public/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/artDialog/plugins/iframeTools.js"></script>
</head>
<body>

<form action="" method="post" id="myform">
    <div class="pad-10">
        <div id="div_setting_1" class="contentList pad-10">
            <table width="100%" class="table_form">
                <tr>
                    <th width="120">用户名：</th>
                    <td><?php echo ($info["username"]); ?></td>
                </tr>
                <tr>
                    <th>昵称：</th>
                    <td>
                        <input name="data[nickname]" class="input-text" type="text" id="" value="<?php echo ($info["nickname"]); ?>">
                    </td>
                </tr>
                <?php if(!empty($info['avatar'])): ?><tr>
                        <th>头像：</th>
                        <td>
                            <img src="<?php echo ($info["avatar"]); ?>">
                        </td>
                    </tr>
                    <input name="data[avatar]" type="hidden" value="<?php echo ($info["avatar"]); ?>"><?php endif; ?>
                <tr>
                    <th>邮箱：</th>
                    <td>
                        <input type="text" class="input-text" name="data[email]" value="<?php echo ($info["email"]); ?>" size="30" />
                    </td>
                </tr>
                <tr>
                    <th>电话：</th>
                    <td>
                        <input type="text" class="input-text" name="data[phone]" value="<?php echo ($info["phone"]); ?>" size="30" />
                    </td>
                </tr>
                <tr>
                    <th>地址：</th>
                    <td>
                        <input type="text" class="input-text" name="data[address]" value="<?php echo ($info["address"]); ?>" size="30" style="width:220px;" />
                    </td>
                </tr>
                <tr>
                    <th>备注：</th>
                    <td>
                        <textarea name="data[remark]"><?php echo (trim($info["remark"])); ?></textarea>
                    </td>
                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td>
                        <input id="save-button" name="dosubmit" type="submit" value="确定修改" class="button">
                    </td>
                </tr>
            </table>
        </div>
</form>
</div>
</body>

</html>
<script type="text/javascript" src="/Public/Js/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/Js/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript">
    $(function() {
        $('#myform').ajaxForm({
            beforeSubmit: checkForm,
            success: complete,
            dataType: 'json'
        });

        function checkForm() {
            return true;
        }
        var origin = $.artDialog.open.origin;

        function complete(data) {

          $("#save-button").attr('value',data.info);
          setTimeout(function() { $("#save-button").attr('value','确定修改'); }, 1000);
          return false;
        }
    })
</script>